# $Id: PKGBUILD 89961 2013-05-06 10:41:03Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Greg Bouzakis <gregbouzakis@gmail.com>
# Contributor: Alexander Fehr <pizzapunk gmail com>
# Contributor: Philipp Giebel <arch@ambience-design.net>

pkgname=keepassx
pkgver=0.4.3
pkgrel=5
pkgdesc='Password manager'
arch=('i686' 'x86_64')
url='http://www.keepassx.org'
license=('GPL2')
depends=('libxtst' 'qt4' 'shared-mime-info')
makedepends=('optipng')
install=keepassx.install
source=(http://downloads.sourceforge.net/keepassx/$pkgname-$pkgver.tar.gz)
md5sums=('1df67bb22b2e08df49f09e61d156f508')

build() {
  cd $srcdir/$pkgname-$pkgver
  sed -i '1,1i#include <unistd.h>' src/lib/random.cpp
  qmake-qt4
  make
  find -name '*.png' -exec optipng -quiet -force -fix {} \;
}

package() {
  cd $srcdir/$pkgname-$pkgver
  make INSTALL_ROOT=$pkgdir install
}
